using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Msg_WebDisplayMap : EntityTypeConfiguration<Msg_WebDisplay>
    {
        public Msg_WebDisplayMap()
        {
            // Primary Key
            this.HasKey(t => t.message_Id);

            // Properties
            this.Property(t => t.msg_from)
                .HasMaxLength(50);

            this.Property(t => t.msg_To)
                .HasMaxLength(50);

            this.Property(t => t.msg_subject)
                .HasMaxLength(50);

            this.Property(t => t.msg_Content)
                .HasMaxLength(2000);

            // Table & Column Mappings
            this.ToTable("Msg_WebDisplay");
            this.Property(t => t.message_Id).HasColumnName("message_Id");
            this.Property(t => t.msg_from).HasColumnName("msg_from");
            this.Property(t => t.msg_To).HasColumnName("msg_To");
            this.Property(t => t.msg_subject).HasColumnName("msg_subject");
            this.Property(t => t.msg_Content).HasColumnName("msg_Content");
            this.Property(t => t.msg_Time).HasColumnName("msg_Time");
            this.Property(t => t.status).HasColumnName("status");
        }
    }
}
